import { UserConfig, ConfigEnv, loadEnv, defineConfig } from "vite";
import { resolve } from "path";
const pathSrc = resolve(__dirname, "src");


// https://vitejs.dev/config/
export default ({ mode }: ConfigEnv): UserConfig => {
  const env = loadEnv(mode, process.cwd());

  return {
    // 路径别名
    resolve: {
      alias: {
        "@": pathSrc,
      },
    },
    server: {
      host:"localhost",
      //vue3 vite配置热更新不用手动刷新
      hmr:true,
    },
    plugins: [

    ],
  };
};
